package main.java;

import jakarta.servlet.ServletConfig;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;

/**
 * @author 86187
 * @classname FirstServlet
 * @time 2024/3/11
 * @project javaweb_project
 */
public class FirstServlet extends HttpServlet {

    @Override
    public void init(ServletConfig config) throws ServletException {
        System.out.println("FirstServlet init方法被调用了");
        super.init(config);
    }

    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("FirstServlet service方法被调用了");
        super.service(req, resp);
    }

    @Override
    public void destroy() {
        System.out.println("FirstServlet destroy方法被调用了");
        super.destroy();
    }
}


